package com.estar.assistsurvy.thread;

import com.estar.assistsurvy.constant.Constants;
import com.estar.assistsurvy.entity.RequestBaseInfo;
import com.estar.assistsurvy.entity.ResponseMsg;
import android.content.Context;
import android.os.Handler;
import android.util.Log;

public class BaseInfoThread extends BaseThread {

	private RequestBaseInfo baseInfo;

	public BaseInfoThread(Context context, Handler handler, RequestBaseInfo baseInfo) {
		super(context, handler);
		this.baseInfo = baseInfo;
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		url_str=Constants.NAMESPACE+Constants.BASEINFOCERTIFIED;
		json=gson.toJson(baseInfo);
		postRequest(url_str, json);
		if(result!=null){
			ResponseMsg message=new ResponseMsg();
			message=gson.fromJson(result, ResponseMsg.class);
			msg.what=0;
			msg.obj=message;
			msg.sendToTarget();
		}
		Log.i("wl", "基本信息提交返回值"+result);
	}
}
